/**
 * Created by IntelliJ IDEA.
 * User: Tomek
 * Date: 28.11.12
 * Time: 20:40
 * To change this template use File | Settings | File Templates.
 */
package AS3 {
import AS3.constants.Coefficients;

public class FossilInfoFactory {
    public function FossilInfoFactory() {
    }

    public static function createFossilInfo(countryEmission:CountryEmission,convertedEmission:ConvertedEmission):FossilInfo {
        var fossilINfo:FossilInfo = new FossilInfo();
        fossilINfo.totalEmission = EmissionHelper.getSumOfAllEmissions(countryEmission);
        fossilINfo.coalConsumption = convertedEmission.coalConsumption / 1000;
        fossilINfo.oilConsumption = convertedEmission.oilConsumption / 1000;
        fossilINfo.gasConsumption = convertedEmission.gasConsumption / 1000;
        return fossilINfo;
    }
}
}
